package com.wy.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import com.wy.model.User;
import com.wy.dao.UserDao;
import com.wy.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Resource
	private UserDao userDao;
	
	/**
	 * 新增
	 */
	@Override
	public int insert(User user) {
		return userDao.insert(user);
	}
	
	/**
	 * 修改
	 */
	@Override
	public int update(User user) {
		return userDao.update(user);
	}
	
	/**
	 * 根据ID删除
	 */
	@Override
	public int deletebth(String[] ids) {
		return userDao.deletebth(ids);
	}
	
	/**
	 * 根据ID查询单条详情
	 */
	@Override
	public User getById(String id) {
		return userDao.getById(id);
	}
	
	/**
	 * 查询列表
	 */
	@Override
	public List<User> list(User user) {
		return userDao.list(user);
	}

}